import { createSlice } from '@reduxjs/toolkit';

const appSlice = createSlice({
  name: 'app',
  initialState: {
    // 加载中
    loading: false,
  },
  reducers: {
    updateLoading(state, action) {
      /* 修改loading */
      state.loading = action.payload;
    },
  },
});
export const { updateLoading } = appSlice.actions;
export default appSlice.reducer;
